home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
DriverSupport.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
9KB
|
432 lines
;
; File: DriverSupport.a
;
; Contains: Driver Support Interfaces.
;
; Version: Technology: Sustem 7.5 and 8
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__DRIVERSUPPORT__') = 'UNDEFINED' THEN
__DRIVERSUPPORT__ SET 1
IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
include 'ConditionalMacros.a'
ENDIF
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
include 'Kernel.a'
ENDIF
IF FOR_SYSTEM8_PREEMPTIVE THEN
IF &TYPE('__TIMING__') = 'UNDEFINED' THEN
include 'Timing.a'
ENDIF
ENDIF
IF &TYPE('__DEVICES__') = 'UNDEFINED' THEN
include 'Devices.a'
ENDIF
IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
include 'OSUtils.a'
ENDIF
IF &TYPE('__MACHINEEXCEPTIONS__') = 'UNDEFINED' THEN
include 'MachineExceptions.a'
ENDIF
; typedef LogicalAddress * DeviceLogicalAddressPtr
IF FOR_SYSTEM7_ONLY THEN
durationMicrosecond EQU -1 ; Microseconds are negative
durationMillisecond EQU 1 ; Milliseconds are positive
durationSecond EQU 1000 ; 1000 * durationMillisecond
durationMinute EQU 60000 ; 60 * durationSecond,
durationHour EQU 3600000 ; 60 * durationMinute,
durationDay EQU 86400000 ; 24 * durationHour,
durationNoWait EQU 0 ; don't block
durationForever EQU $7FFFFFFF ; no time limit
kCurrentAddressSpaceID EQU -1
ENDIF
k8BitAccess EQU 0 ; access as 8 bit
k16BitAccess EQU 1 ; access as 16 bit
k32BitAccess EQU 2 ; access as 32 bit
IF FOR_SYSTEM7_ONLY THEN
Nanoseconds RECORD 0
f ds UnsignedWide
sizeof EQU * ; size: $8 (8)
ENDR
ENDIF
;
; extern void BlockCopy(const void *srcPtr, void *destPtr, Size byteCount)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION BlockCopy
ENDIF
;
; extern LogicalAddress PoolAllocateResident(ByteCount byteSize, Boolean clear)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PoolAllocateResident
ENDIF
;
; extern OSStatus PoolDeallocate(LogicalAddress address)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PoolDeallocate
ENDIF
;
; extern ByteCount GetLogicalPageSize(void )
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetLogicalPageSize
ENDIF
;
; extern ByteCount GetDataCacheLineSize(void )
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetDataCacheLineSize
ENDIF
;
; extern OSStatus FlushProcessorCache(AddressSpaceID spaceID, LogicalAddress base, ByteCount length)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION FlushProcessorCache
ENDIF
;
; extern void SynchronizeIO(void )
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SynchronizeIO
ENDIF
;
; extern LogicalAddress MemAllocatePhysicallyContiguous(ByteCount byteSize, Boolean clear)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION MemAllocatePhysicallyContiguous
ENDIF
;
; extern OSStatus MemDeallocatePhysicallyContiguous(LogicalAddress address)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION MemDeallocatePhysicallyContiguous
ENDIF
IF FOR_SYSTEM7_ONLY THEN
;
; extern AbsoluteTime UpTime(void )
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION UpTime
ENDIF
;
; extern void GetTimeBaseInfo(UInt32 *minAbsoluteTimeDelta, UInt32 *theAbsoluteTimeToNanosecondNumerator, UInt32 *theAbsoluteTimeToNanosecondDenominator, UInt32 *theProcessorToAbsoluteTimeNumerator, UInt32 *theProcessorToAbsoluteTimeDenominator)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION GetTimeBaseInfo
ENDIF
;
; extern Nanoseconds AbsoluteToNanoseconds(AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AbsoluteToNanoseconds
ENDIF
;
; extern Duration AbsoluteToDuration(AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AbsoluteToDuration
ENDIF
;
; extern AbsoluteTime NanosecondsToAbsolute(Nanoseconds nanoseconds)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION NanosecondsToAbsolute
ENDIF
;
; extern AbsoluteTime DurationToAbsolute(Duration duration)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION DurationToAbsolute
ENDIF
;
; extern AbsoluteTime AddAbsoluteToAbsolute(AbsoluteTime absoluteTime1, AbsoluteTime absoluteTime2)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AddAbsoluteToAbsolute
ENDIF
;
; extern AbsoluteTime SubAbsoluteFromAbsolute(AbsoluteTime leftAbsoluteTime, AbsoluteTime rightAbsoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SubAbsoluteFromAbsolute
ENDIF
;
; extern AbsoluteTime AddNanosecondsToAbsolute(Nanoseconds nanoseconds, AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AddNanosecondsToAbsolute
ENDIF
;
; extern AbsoluteTime AddDurationToAbsolute(Duration duration, AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AddDurationToAbsolute
ENDIF
;
; extern AbsoluteTime SubNanosecondsFromAbsolute(Nanoseconds nanoseconds, AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SubNanosecondsFromAbsolute
ENDIF
;
; extern AbsoluteTime SubDurationFromAbsolute(Duration duration, AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SubDurationFromAbsolute
ENDIF
;
; extern Nanoseconds AbsoluteDeltaToNanoseconds(AbsoluteTime leftAbsoluteTime, AbsoluteTime rightAbsoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AbsoluteDeltaToNanoseconds
ENDIF
;
; extern Duration AbsoluteDeltaToDuration(AbsoluteTime leftAbsoluteTime, AbsoluteTime rightAbsoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION AbsoluteDeltaToDuration
ENDIF
;
; extern Nanoseconds DurationToNanoseconds(Duration theDuration)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION DurationToNanoseconds
ENDIF
;
; extern Duration NanosecondsToDuration(Nanoseconds theNanoseconds)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION NanosecondsToDuration
ENDIF
ENDIF
;
; extern OSErr PBQueueInit(QHdrPtr qHeader)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBQueueInit
ENDIF
;
; extern OSErr PBQueueCreate(QHdrPtr *qHeader)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBQueueCreate
ENDIF
;
; extern OSErr PBQueueDelete(QHdrPtr qHeader)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBQueueDelete
ENDIF
;
; extern void PBEnqueue(QElemPtr qElement, QHdrPtr qHeader)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBEnqueue
ENDIF
;
; extern OSErr PBEnqueueLast(QElemPtr qElement, QHdrPtr qHeader)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBEnqueueLast
ENDIF
;
; extern OSErr PBDequeue(QElemPtr qElement, QHdrPtr qHeader)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBDequeue
ENDIF
;
; extern OSErr PBDequeueFirst(QHdrPtr qHeader, QElemPtr *theFirstqElem)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBDequeueFirst
ENDIF
;
; extern OSErr PBDequeueLast(QHdrPtr qHeader, QElemPtr *theLastqElem)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PBDequeueLast
ENDIF
;
; extern char *CStrCopy(char *dst, const char *src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrCopy
ENDIF
;
; extern StringPtr PStrCopy(StringPtr dst, ConstStr255Param src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrCopy
ENDIF
;
; extern char *CStrNCopy(char *dst, const char *src, UInt32 max)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrNCopy
ENDIF
;
; extern StringPtr PStrNCopy(StringPtr dst, ConstStr255Param src, UInt32 max)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrNCopy
ENDIF
;
; extern char *CStrCat(char *dst, const char *src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrCat
ENDIF
;
; extern StringPtr PStrCat(StringPtr dst, ConstStr255Param src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrCat
ENDIF
;
; extern char *CStrNCat(char *dst, const char *src, UInt32 max)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrNCat
ENDIF
;
; extern StringPtr PStrNCat(StringPtr dst, ConstStr255Param src, UInt32 max)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrNCat
ENDIF
;
; extern void PStrToCStr(char *dst, ConstStr255Param src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrToCStr
ENDIF
;
; extern void CStrToPStr(Str255 dst, const char *src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrToPStr
ENDIF
;
; extern SInt16 CStrCmp(const char *s1, const char *s2)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrCmp
ENDIF
;
; extern SInt16 PStrCmp(ConstStr255Param str1, ConstStr255Param str2)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrCmp
ENDIF
;
; extern SInt16 CStrNCmp(const char *s1, const char *s2, UInt32 max)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrNCmp
ENDIF
;
; extern SInt16 PStrNCmp(ConstStr255Param str1, ConstStr255Param str2, UInt32 max)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrNCmp
ENDIF
;
; extern UInt32 CStrLen(const char *src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CStrLen
ENDIF
;
; extern UInt32 PStrLen(ConstStr255Param src)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION PStrLen
ENDIF
;
; extern OSStatus DeviceProbe(void *theSrc, void *theDest, UInt32 AccessType)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION DeviceProbe
ENDIF
;
; extern OSStatus DelayForHardware(AbsoluteTime absoluteTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION DelayForHardware
ENDIF
ENDIF ; __DRIVERSUPPORT__